package com.sicau.socialpracticesystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sicau.socialpracticesystem.entity.po.Points;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 积分表 Mapper 接口
 * </p>
 *
 * @author sxt && ttxxi
 * @since 2021-04-26
 */
public interface PointsMapper extends BaseMapper<Points> {

    @Update("update points set all_points = all_points + #{addPoints} where user_number = #{userNumber}")
    void addPointsByUserNumber(@Param("userNumber") Integer userNumber, @Param("addPoints")Double addPoints);

}
